package com.wc.alorithm_blue_bridge._动态规划.线性DP.栈_Stack;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2025/3/27 16:38
 * @description
 * https://www.lanqiao.cn/problems/746/learning/?page=1&first_category_id=1&tags=%E9%80%92%E6%8E%A8&tag_relation=union
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 20;
    static long[] f = new long[N];
    static int n;

    public static void main(String[] args) {
        n = sc.nextInt();
        f[1] = 1;
        for (int i = 2; i <= n; i++) {
            // 第 i 个 push 全部 pop 一种, 里面的数先全部出来 一种
            f[i] = f[i - 1] * 2;
            // 然后前 j 个数 全部 pop * 后面 (i - j - 1) 全部pop的
            for (int j = 1; j <= i - 2; j++) {
                f[i] += f[j] * f[i - j - 1];
            }
        }
        out.println(f[n]);
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}

